package com.ruoyi;

import com.ruoyi.nettyMqttServer.BootNettyMqttServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.context.annotation.ComponentScan;


@SpringBootApplication
    public class MqttApplication implements CommandLineRunner {

    @Autowired
    BootNettyMqttServer bootNettyMqttServer;

    public static void main(String[] args) {
        SpringApplication.run(MqttApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        bootNettyMqttServer.startup(5678);
    }

}
